﻿{% extends 'base.html' %}     # 继承母版内容


<!-- 填充页面内容 -->
{% block body-content %}
    <div class="container">
        <p></p>
        <table class="table table-bordered form-inline" align="center">
            <caption>研发部目前实施项目信息列表</caption>
            <thead>
            <tr>
                <th>序号</th>
                <th>项目类型</th>
                <th>项目编号</th>
                <th>项目名称</th>
                <th>项目经理</th>
                <th>实施产品</th>
                <th>项目状态</th>
                <th>立项日期</th>
                <th>上线日期</th>
                <th>结项日期</th>
            </tr>
            </thead>
            <tbody>
            {% for d in detail_list %}
                <!-- 显示不同背景 -->
                <tr {% if forloop.counter|divisibleby:"2" %} class="active"
                {% else %} class="success"  {% endif %}  >
                    <td>{{ d.id }}</td>
                    <td>{{ d.type_number }}</td>
                    <td>{{ d.detail_number }}</td>
                    <td>{{ d.detail_name }}</td>
                    <td>{{ d.pm_name }}</td>
                    <td>{{ d.prd_name }}</td>
                    <td>{{ d.status_name }}</td>
                    <td>{{ d.start_date }}</td>
                    <td>{{ d.running_date }}</td>
                    <td>{{ d.end_date }}</td>
                </tr>
            {% endfor %}
            </tbody>

        </table>
        <!-- 页面导航栏 -->
        <p>
            {% if detail_list.has_previous %}
                <a href="?page={{ detail_list.previous_page_number }}">上一页</a>
            {% endif %}
            {# data.paginator.number_pages 返回总页数 #}
            第{{ detail_list.number }}页 | 共{{ detail_list.paginator.num_pages }}页
            {% if detail_list.has_next %}
                <a href="?page={{ detail_list.next_page_number }}">下一页</a>
            {% endif %}
        </p>

    </div>

{% endblock %}
